package com.mtsmda.oracleOfficialTutorialJAVA7.chapter1.classes.subPackage;

import java.util.Date;

public class Browser {
	public String name = "Google Chrome";
	protected String versionNumber = "30.01.255";
	String engine = "webKit";
	private Date createdDate = new Date(2005, 0, 1);
	private Integer id;
	private static int numberOfBrowsers;
	private final String myName;

	public Browser() {
		this.id = ++numberOfBrowsers;
		myName = "B";
	}

	public Browser(String name) {
		this();
		this.name = name;
	}

	public void browserID() {
		System.out.println(this.name + " is id = " + id);
		System.out.println(numberOfBrowsers);
		getIDB();
		myName = "C";
	}
	
	private static int getID(){
		return numberOfBrowsers;
	}
	
	private static int getIDB(){
		return getID();
	}

}